Computer generated 3-D animations enrich a wide range of human experience, captivating audiences at the movie theaters, gluing garners to their personal computers, and embarking home buyers on virtual tours of new homes. To generate 3-D animations, a 3-D designer creates 3-D computer models of the entities using computer aided design systems (CAD). These models are used to emulate the movement, color, and shape of animated entities, from a dancing baby to space ships trekking through the universe.
3-D models are often composed of graphical components that represent the shapes and surfaces that make up modeled entities. A graphical component is a set of data, procedures, or a combination thereof, used to represent a geometry, such as a curve or the surface of a car. A graphical component may consist of multiple other graphical components, to represent more complex geometry, such as a car or human individual.
3-D models are built by users using a Computer Aid Design (“CAD”) system. The user enters commands and data into the CAD system, and in response, the CAD system generates graphical components. Typically, a user enters commands and data through a graphical user interface (“GUI”).
A GUI is a visual display that allows a user to enter commands and data into a computer system by using user input devices, such as a mouse, to manipulate and interact with user interface controls such as a window, a button, a dialogue box, and graphics that represent graphical components. Typically, a graphical user interface used in a CAD system includes a display in which graphical components are “interactively rendered”. The term interactively rendered refers to updating the display of the graphical components, in response to receiving user input, to reflect the user input. Even more, a user may modify graphical components by using an input device to manipulate the rendered graphical components. Thus, the GUI enables users to visualize the graphical components they create and edit.
For example, a user modifies graphical components depicting a human standing in a room. To change the position of the human within the room, a user uses a mouse to drag the human to a new position within the room. To turn the human around so the human is facing the opposite direction, the user uses the mouse to rotate the human.
GUIs are used to create frames for animations. A frame is the state of a set of graphical components at a particular point in time. Animations are generated by displaying a sequence of frames at a particular frequency, such as thirty times per second. For example, a sequence of frames may be used to animate marbles rolling across the room from the left side of the room to the right. Each frame of the sequence would include a graphical component for each of the marbles. In the first frame the marbles are at the far left of the room. In the second frame, the marbles are positioned a little closer to the right, and so forth. The marbles are rendered in positions that are shifted in each of the frames, which are displayed in rapid sequence to animate the marbles rolling across the room.
To generate a sequence of frames, a user through the GUI interface on a CAD system may generate data specifying the state of the frames. For example, a user is creating data that specifies the state for each frame in a sequence of frames. For a given frame, the user moves each of the marbles to a different position by dragging an image of the marble displayed in the GUI, storing data for the frame, then dragging each of the marbles to their next position, and storing data for another frame, and repeating these manipulations for each of the remaining frames.
Consequently, to generate a sequence of frames, a user may repetitively perform the same GUI manipulations. Often, user input that is created by repetitively performing the same kinds of manipulations may be entered more efficiently through the use of a scripting language. A scripting language is a computer language that contains instructions that correspond to user input that may be entered through a GUI. This allows users of CAD systems, with little or no training in programming, to develop scripts because the scripts contain instructions that correspond to familiar ways of entering input through a GUI. In addition, the scripting language, like computer languages in general, define control constructs that may be used to control the execution of programs written in a scripting language (“scripts”), and automatically repeat the execution of a set of instructions. A for loop is an example of such a construct. For example, the following script EX illustrates how lines of instructions may be written in a scripting language to input commands and data more efficiently into a CAD system.
for fr in 1 to 1000 by 10 do (                delta+=5        create_frame(fr)        move marble1.position(delta,0,0,fr)        move marble2.position(delta,0,0,fr)        move marble3.position(delta,0,0,fr)        move marble4.position(delta,0,0,fr)        move marble5.position(delta,0,0,fr)        store_in_frame(fr)        )        
The preceding “for” loop is repeated 100 times to create frames used to animate marbles accelerating across the room. During each iteration, the scripting language specifies that:                (1) a new frame should be created that is associated with the integer sequence fr,        (2) five marbles should be moved across the room along the X axis for 100 units at a distance represented by delta, which is increased during each iteration,        (3) the new position of each of the five should be recorded in the frame by storing data associated with the frame fr.        
Very often developers of scripts program tasks that apply the same operations to each graphical component in a set of graphical components. A task that involves performing the same or substantially similar operation on a set of graphical components is referred to herein as a duplicated task. A duplicated task may be programmed by explicitly writing lines that each specify the same operation, each line referencing a particular graphical component in the set. For example, script EX specifies that the same move operation is to be performed on the graphical components marble1, marble2, marble3, marble4, and marble5.
Obviously, writing very similar lines of code that each specify an identical operation is a repetitive task. In addition, writing a group of such lines to program a duplicated task may frustrate another purpose for writing scripts or programs in a computer language, which is to describe a task or algorithm to a reader of the script or program. Multiple lines of code, that specify substantially the same task, describe a duplicated task inconcisely, and thus impede comprehension of the script.
To program a duplicated task more efficiently, aggregate data structures, such as arrays, may be used for managing collections of graphical components. For example, a user may write a script that declares array structures with elements, each element referencing an object. A user may program the duplicated task by, for example, writing a for loop for iterating through the array, and for each object referenced by an element of the array, performing the same operation.
Use of aggregate data structures and programming constructs for executing tasks repetitively, such as arrays and for loops, requires application of programming techniques that are often unknown to users of CAD systems. While the users of CAD systems may be experts at using a CAD system through a GUI, many such users have received no training in programming.
Based on the foregoing, it is desirable to provide a technique for programming duplicated tasks that does not require programming constructs, such as a for loop, for repeatedly executing the same operation.